/**
 * ***********************************************************
 * Castor CodeGen 1.2.1 with SoNiC ME serialization patch:    
 * ***********************************************************
 * @author Adam Dec (SoNiC, snc85@o2.pl)
 * @since 14-12-2008
 * @update 14-02-2009
 * ***********************************************************
 * 
 * ***********************************************************
 * Changed Castor CodeGen 1.2 classes:
 *  - JType.java
 *  - CollectionMemberAndAccessorFactory.java
 *  - SourceFactory.java
 * ***********************************************************
 */

package com.sonic.mquotes.dto;

/**
 * Class Pap_subcategoryType.
 * 
 * @version $Revision$ $Date$
 */
public class Pap_subcategoryType implements de.enough.polish.io.Externalizable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _id.
     */
    private int _id;

    /**
     * keeps track of state for field: _id
     */
    private boolean _has_id;


      //----------------/
     //- Constructors -/
    //----------------/

    public Pap_subcategoryType() {
        super();
    }


      //-----------/
     //- Methods -/
    //-----------/

    /**
     */
    public void deleteId(
    ) {
        this._has_id= false;
    }

    /**
     * Returns the value of field 'id'.
     * 
     * @return the value of field 'Id'.
     */
    public int getId(
    ) {
        return this._id;
    }

    /**
     * Method hasId.
     * 
     * @return true if at least one Id has been added
     */
    public boolean hasId(
    ) {
        return this._has_id;
    }

    /**
     * Reads data from byte stream.
     * 
     * @param dis
     * @throws java.io.IOException 
     */
    public void read(
            final java.io.DataInputStream dis)
    throws java.io.IOException {
        this._id = dis.readInt();
this._has_id = dis.readBoolean();

    }

    /**
     * Sets the value of field 'id'.
     * 
     * @param id the value of field 'id'.
     */
    public void setId(
            final int id) {
        this._id = id;
        this._has_id = true;
    }

    /**
     * Writes data to byte stream.
     * 
     * @param dos
     * @throws java.io.IOException 
     */
    public void write(
            final java.io.DataOutputStream dos)
    throws java.io.IOException {
        dos.writeInt( this._id );
dos.writeBoolean( this._has_id );

    }

}
